hyundai: add speed-dependent steering torque limits for Kia EV6 - #3720
hyundai: add speed-dependent steering torque limits for Kia EV6#3720TonyBinheWu wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
Car behavior reportReplays driving segments through this PR and compares the behavior to master. Testing 260 segments for: HYUNDAI_AZERA_HEV_6TH_GEN, HYUNDAI_ELANTRA_GT_I30, HYUNDAI_ELANTRA_2021, HYUNDAI_ELANTRA_HEV_2021, HYUNDAI_GENESIS, HYUNDAI_IONIQ, HYUNDAI_IONIQ_HEV_2022, HYUNDAI_IONIQ_EV_2020, HYUNDAI_IONIQ_PHEV_2019, HYUNDAI_IONIQ_PHEV, HYUNDAI_KONA_2022, HYUNDAI_KONA_EV, HYUNDAI_KONA_EV_2022, HYUNDAI_KONA_EV_2ND_GEN, HYUNDAI_SANTA_FE, HYUNDAI_SANTA_FE_2022, HYUNDAI_SANTA_FE_HEV_2022, HYUNDAI_SANTA_FE_PHEV_2022, HYUNDAI_SONATA, HYUNDAI_SONATA_LF, HYUNDAI_STARIA_4TH_GEN, HYUNDAI_PALISADE, HYUNDAI_SONATA_HYBRID, HYUNDAI_IONIQ_5, HYUNDAI_IONIQ_6, HYUNDAI_TUCSON_4TH_GEN, HYUNDAI_SANTA_CRUZ_1ST_GEN, HYUNDAI_CUSTIN_1ST_GEN ✅ 0 changed, 260 passed, 0 errors |
This proposes an EV6-only, speed-dependent steering torque envelope to investigate reported saturation near 13 m/s. A preliminary, user-provided qlog summary from a downstream build reports output at -270 before driver steering input, with desired curvature about 14% above achieved curvature. The raw route was not re-analyzed during this implementation. The 310 maximum is a candidate for validation, not a validated physical steering limit.
Changes:
CAR.KIA_EV6.[9, 13, 17] m/s -> [310, 310, 270]: 310 through 13 m/s, linearly decreasing to 270 at 17 m/s.vEgoRawfor controller scaling, driver torque limiting, and normalized actuator feedback.dynamic_max_torque/max_torque_lookup. Cap the generic framework's speed/torque tolerance at the rounded nominal curve, so the limit is 270 once the minimum sampled speed reaches 17 m/s. This EV6-specific cap leaves the shared framework unchanged.Tests cover platform scope, emitted CAN torque and feedback, interpolation boundaries, wheel-speed quantization, flag reset, driver intervention, rates, and steering-request checks across six CAN-FD safety configurations. The existing non-actuating CAN-address overlap exception is extended to the new LKAS-longitudinal test class.
Validation
python -m unittest discover -q: 4,206 tests, 726 skipped, passed.UV_OFFLINE=1 ./opendbc/safety/tests/test.sh: 3,391 tests, 416 skipped, passed; 100% line coverage for all checked safety files.git diff --check: passed../test.shwas attempted. Its parallel unittest runner could not start because this environment denies its local IPC socket. The same default unittest discovery passed in a single process, as listed above.Keeping this PR in draft pending stock openpilot reproduction and before/after route plots for requested/applied torque, curvature tracking, driver torque, lateral acceleration, and jerk. Bench tests do not establish the vehicle's physical steering limits.